package com.zpark.sports.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class SportsMvcConfig implements WebMvcConfigurer {

    // 配置指定访问路径
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // 当访问 / 路径时跳转到系统首页
        registry.addViewController("/").setViewName("index");

    }
}
